Low-latency two-pass video coding

ABSTRACT

Low-latency two-pass video coding may include identifying an input frame from an input video stream, determining a reduced frame from the input frame, the reduced frame having a size smaller than a size of the input frame, encoding the reduced frame using a first encoder, generating a plurality of encoding parameters based on encoding the reduced frame, generating an encoded frame by encoding the input frame using the first encoder and the plurality of encoding parameters, including the first encoded frame in an output bitstream, and storing or transmitting the output bitstream.

BACKGROUND

Digital video can be used, for example, for remote business meetings viavideo conferencing, high definition video entertainment, videoadvertisements, or sharing of user-generated videos. Due to the largeamount of data involved in video data, high performance compression isneeded for transmission and storage. Accordingly, it would beadvantageous to provide high resolution video transmitted overcommunications channels having limited bandwidth.

SUMMARY

This application relates to encoding and decoding of video stream datafor transmission or storage. Disclosed herein are aspects of systems,methods, and apparatuses for encoding and decoding using low-latencytwo-pass video coding.

An aspect is a method for video coding using low-latency two-pass videocoding. Video coding using low-latency two-pass video coding may includeidentifying an input frame from an input video stream, determining areduced frame from the input frame, the reduced frame having a sizesmaller than a size of the input frame, encoding the reduced frame usinga first encoder, generating a plurality of encoding parameters based onencoding the reduced frame, generating an encoded frame by encoding theinput frame using the first encoder and the plurality of encodingparameters, including the first encoded frame in an output bitstream,and storing or transmitting the output bitstream.

Another aspect is a method for video coding using low-latency two-passvideo coding. In some implementations, video coding using low-latencytwo-pass video coding may include identifying an input frame from aninput video stream, wherein the input frame includes an input block,determining a reduced frame from the input frame, the reduced framehaving a size smaller than a size of the input frame, wherein thereduced frame includes a reduced block spatially corresponding to atleast a portion of the input block, encoding, by a first encoder, thereduced frame, wherein encoding the reduced frame includes identifying amotion vector for encoding the reduced block, generating, by the firstencoder, an encoded frame by encoding the input frame, wherein encodingthe input frame includes, on a condition that the motion vector exceedsa motion threshold, using a motion search area for motion estimation forthe input block, wherein the motion search area is identified based onthe motion vector, including the encoded frame in an output bitstream,and storing or transmitting the output bitstream.

Another aspect is a method for video coding using low-latency two-passvideo coding. In some implementations, video coding using low-latencytwo-pass video coding may include identifying an input frame from aninput video stream, determining a reduced frame from the input frame,the reduced frame having a size smaller than a size of the input frame,wherein determining the reduced frame from the input frame includescropping the input frame, scaling the input frame, or cropping andscaling the input frame, encoding, using a first encoder, the reducedframe, wherein encoding the reduced frame includes generating aplurality of encoding metrics, generating at least one encodingparameter based on the plurality of encoding metrics, generating, usingthe first encoder, an encoded frame by encoding the input frame usingthe at least one encoding parameter, including the first encoded framein an output bitstream, and storing or transmitting the outputbitstream.

Variations in these and other aspects will be described in additionaldetail hereafter.

BRIEF DESCRIPTION OF THE DRAWINGS

The description herein makes reference to the accompanying drawingswherein like reference numerals refer to like parts throughout theseveral views, and wherein:

FIG. 1 is a diagram of a computing device in accordance withimplementations of this disclosure;

FIG. 2 is a diagram of a computing and communications system inaccordance with implementations of this disclosure;

FIG. 3 is a diagram of a video stream for use in encoding and decodingin accordance with implementations of this disclosure;

FIG. 4 is a block diagram of an encoder in accordance withimplementations of this disclosure;

FIG. 5 is a block diagram of a decoder in accordance withimplementations of this disclosure;

FIG. 6 is a block diagram of a representation of a portion of a frame inaccordance with implementations of this disclosure;

FIG. 7 is a block diagram of a low-latency two-pass video coding unit inaccordance with implementations of this disclosure;

FIG. 8 is a flow diagram of a method of low-latency two-pass videocoding in accordance with implementations of this disclosure;

FIG. 9 is a diagram of an example of buffering for low-latency two-passvideo coding in accordance with implementations of this disclosure; and

FIG. 10 is a diagram of examples of generating a reduced frame forlow-latency two-pass video coding in accordance with implementations ofthis disclosure.

DETAILED DESCRIPTION

Encoding a sequence of video frames may include making various codingdecisions, such as whether to encode a frame independently, as anintra-coded frame, or differentially, as an inter-coded frame, balancingaccuracy, or the degree to which a decoded frame matches thecorresponding input frame, compression, speed, and resource utilization.Some coding decisions may be based on coding parameters provided to theencoder before or during the encoding process. In some implementations,such as in a single-pass encoder, some coding parameters may bedetermined independently of the frame being encoded, which may reducethe efficiency, quality, or both of the video coding.

In some implementations, video coding may include two-pass video coding,wherein an input frame may be encoded using a first-pass to identifyinformation, such as coding parameters, for encoding the input frame,and a second-pass using the information identified by the first-pass toimprove coding quality and efficiency. In some implementations, such asimplementations for use in real-time video coding, two-pass video codingmay be unavailable because two-pass video coding may more than doublethe resource utilization of single-pass video coding. For example,two-pass video coding may utilize more time, or latency, to encode eachframe as single-pass video coding. In another example, a two-pass videocoder may utilize twice the number of hardware encoders as a single-passvideo coder.

In some implementations, low-latency two-pass video coding may improvethe encoding quality relative to single-pass video coding and mayminimize latency and hardware utilization. Low-latency two-pass videocoding may include using a single hardware encoder to perform two-passvideo coding and reducing latency by performing first-pass coding usinga reduced size frame. In some implementations, low-latency two-passvideo coding may include using motion information generated by thefirst-pass coding to improve the accuracy of motion estimation duringsecond-pass coding.

FIG. 1 is a diagram of a computing device 100 in accordance withimplementations of this disclosure. A computing device 100 can include acommunication interface 110, a communication unit 120, a user interface(UI) 130, a processor 140, a memory 150, instructions 160, a powersource 170, or any combination thereof. As used herein, the term“computing device” includes any unit, or combination of units, capableof performing any method, or any portion or portions thereof, disclosedherein.

The computing device 100 may be a stationary computing device, such as apersonal computer (PC), a server, a workstation, a minicomputer, or amainframe computer; or a mobile computing device, such as a mobiletelephone, a personal digital assistant (PDA), a laptop, or a tablet PC.Although shown as a single unit, any one or more element of thecommunication device 100 can be integrated into any number of separatephysical units. For example, the UI 130 and processor 140 can beintegrated in a first physical unit and the memory 150 can be integratedin a second physical unit.

The communication interface 110 can be a wireless antenna, as shown, awired communication port, such as an Ethernet port, an infrared port, aserial port, or any other wired or wireless unit capable of interfacingwith a wired or wireless electronic communication medium 180.

The communication unit 120 can be configured to transmit or receivesignals via a wired or wireless medium 180. For example, as shown, thecommunication unit 120 is operatively connected to an antenna configuredto communicate via wireless signals. Although not explicitly shown inFIG. 1, the communication unit 120 can be configured to transmit,receive, or both via any wired or wireless communication medium, such asradio frequency (RF), ultra violet (UV), visible light, fiber optic,wire line, or a combination thereof. Although FIG. 1 shows a singlecommunication unit 120 and a single communication interface 110, anynumber of communication units and any number of communication interfacescan be used.

The UI 130 can include any unit capable of interfacing with a user, suchas a virtual or physical keypad, a touchpad, a display, a touch display,a speaker, a microphone, a video camera, a sensor, or any combinationthereof. The UI 130 can be operatively coupled with the processor, asshown, or with any other element of the communication device 100, suchas the power source 170. Although shown as a single unit, the UI 130 mayinclude one or more physical units. For example, the UI 130 may includean audio interface for performing audio communication with a user, and atouch display for performing visual and touch based communication withthe user. Although shown as separate units, the communication interface110, the communication unit 120, and the UI 130, or portions thereof,may be configured as a combined unit. For example, the communicationinterface 110, the communication unit 120, and the UI 130 may beimplemented as a communications port capable of interfacing with anexternal touchscreen device.

The processor 140 can include any device or system capable ofmanipulating or processing a signal or other information now-existing orhereafter developed, including optical processors, quantum processors,molecular processors, or a combination thereof. For example, theprocessor 140 can include a special purpose processor, a digital signalprocessor (DSP), a plurality of microprocessors, one or moremicroprocessor in association with a DSP core, a controller, amicrocontroller, an Application Specific Integrated Circuit (ASIC), aField Programmable Gate Array (FPGA), a programmable logic array,programmable logic controller, microcode, firmware, any type ofintegrated circuit (IC), a state machine, or any combination thereof. Asused herein, the term “processor” includes a single processor ormultiple processors. The processor can be operatively coupled with thecommunication interface 110, communication unit 120, the UI 130, thememory 150, the instructions 160, the power source 170, or anycombination thereof.

The memory 150 can include any non-transitory computer-usable orcomputer-readable medium, such as any tangible device that can, forexample, contain, store, communicate, or transport the instructions 160,or any information associated therewith, for use by or in connectionwith the processor 140. The non-transitory computer-usable orcomputer-readable medium can be, for example, a solid state drive, amemory card, removable media, a read only memory (ROM), a random accessmemory (RAM), any type of disk including a hard disk, a floppy disk, anoptical disk, a magnetic or optical card, an application specificintegrated circuits (ASICs), or any type of non-transitory mediasuitable for storing electronic information, or any combination thereof.The memory 150 can be connected to, for example, the processor 140through, for example, a memory bus (not explicitly shown).

The instructions 160 can include directions for performing any method,or any portion or portions thereof, disclosed herein. The instructions160 can be realized in hardware, software, or any combination thereof.For example, the instructions 160 may be implemented as informationstored in the memory 150, such as a computer program, that may beexecuted by the processor 140 to perform any of the respective methods,algorithms, aspects, or combinations thereof, as described herein. Theinstructions 160, or a portion thereof, may be implemented as a specialpurpose processor, or circuitry, that can include specialized hardwarefor carrying out any of the methods, algorithms, aspects, orcombinations thereof, as described herein. Portions of the instructions160 can be distributed across multiple processors on the same machine ordifferent machines or across a network such as a local area network, awide area network, the Internet, or a combination thereof.

The power source 170 can be any suitable device for powering thecommunication device 110. For example, the power source 170 can includea wired power source; one or more dry cell batteries, such asnickel-cadmium (NiCd), nickel-zinc (NiZn), nickel metal hydride (NiMH),lithium-ion (Li-ion); solar cells; fuel cells; or any other devicecapable of powering the communication device 110. The communicationinterface 110, the communication unit 120, the UI 130, the processor140, the instructions 160, the memory 150, or any combination thereof,can be operatively coupled with the power source 170.

Although shown as separate elements, the communication interface 110,the communication unit 120, the UI 130, the processor 140, theinstructions 160, the power source 170, the memory 150, or anycombination thereof can be integrated in one or more electronic units,circuits, or chips.

FIG. 2 is a diagram of a computing and communications system 200 inaccordance with implementations of this disclosure. The computing andcommunications system 200 may include one or more computing andcommunication devices 100A/100B/100C, one or more access points210A/210B, one or more networks 220, or a combination thereof. Forexample, the computing and communication system 200 can be a multipleaccess system that provides communication, such as voice, data, video,messaging, broadcast, or a combination thereof, to one or more wired orwireless communicating devices, such as the computing and communicationdevices 100A/100B/100C. Although, for simplicity, FIG. 2 shows threecomputing and communication devices 100A/100B/100C, two access points210A/210B, and one network 220, any number of computing andcommunication devices, access points, and networks can be used.

A computing and communication device 100A/100B/100C can be, for example,a computing device, such as the computing device 100 shown in FIG. 1.For example, as shown the computing and communication devices 100A/100Bmay be user devices, such as a mobile computing device, a laptop, a thinclient, or a smartphone, and computing and the communication device 100Cmay be a server, such as a mainframe or a cluster. Although thecomputing and communication devices 100A/100B are described as userdevices, and the computing and communication device 100C is described asa server, any computing and communication device may perform some or allof the functions of a server, some or all of the functions of a userdevice, or some or all of the functions of a server and a user device.

Each computing and communication device 100A/100B/100C can be configuredto perform wired or wireless communication. For example, a computing andcommunication device 100A/100B/100C can be configured to transmit orreceive wired or wireless communication signals and can include a userequipment (UE), a mobile station, a fixed or mobile subscriber unit, acellular telephone, a personal computer, a tablet computer, a server,consumer electronics, or any similar device. Although each computing andcommunication device 100A/100B/100C is shown as a single unit, acomputing and communication device can include any number ofinterconnected elements.

Each access point 210A/210B can be any type of device configured tocommunicate with a computing and communication device 100A/100B/100C, anetwork 220, or both via wired or wireless communication links180A/180B/180C. For example, an access point 210A/210B can include abase station, a base transceiver station (BTS), a Node-B, an enhancedNode-B (eNode-B), a Home Node-B (HNode-B), a wireless router, a wiredrouter, a hub, a relay, a switch, or any similar wired or wirelessdevice. Although each access point 210A/210B is shown as a single unit,an access point can include any number of interconnected elements.

The network 220 can be any type of network configured to provideservices, such as voice, data, applications, voice over internetprotocol (VoIP), or any other communications protocol or combination ofcommunications protocols, over a wired or wireless communication link.For example, the network 220 can be a local area network (LAN), widearea network (WAN), virtual private network (VPN), a mobile or cellulartelephone network, the Internet, or any other means of electroniccommunication. The network can use a communication protocol, such as thetransmission control protocol (TCP), the user datagram protocol (UDP),the internet protocol (IP), the real-time transport protocol (RTP) theHyper Text Transport Protocol (HTTP), or a combination thereof.

The computing and communication devices 100A/100B/100C can communicatewith each other via the network 220 using one or more a wired orwireless communication links, or via a combination of wired and wirelesscommunication links. For example, as shown the computing andcommunication devices 100A/100B can communicate via wirelesscommunication links 180A/180B, and computing and communication device100C can communicate via a wired communication link 180C. Any of thecomputing and communication devices 100A/100B/100C may communicate usingany wired or wireless communication link, or links. For example, a firstcomputing and communication device 100A can communicate via a firstaccess point 210A using a first type of communication link, a secondcomputing and communication device 100B can communicate via a secondaccess point 210B using a second type of communication link, and a thirdcomputing and communication device 100C can communicate via a thirdaccess point (not shown) using a third type of communication link.Similarly, the access points 210A/210B can communicate with the network220 via one or more types of wired or wireless communication links230A/230B. Although FIG. 2 shows the computing and communication devices100A/100B/100C in communication via the network 220, the computing andcommunication devices 100A/100B/100C can communicate with each other viaany number of communication links, such as a direct wired or wirelesscommunication link.

Other implementations of the computing and communications system 200 arepossible. For example, in an implementation the network 220 can be anad-hock network and can omit one or more of the access points 210A/210B.The computing and communications system 200 may include devices, units,or elements not shown in FIG. 2. For example, the computing andcommunications system 200 may include many more communicating devices,networks, and access points.

FIG. 3 is a diagram of a video stream 300 for use in encoding anddecoding in accordance with implementations of this disclosure. A videostream 300, such as a video stream captured by a video camera or a videostream generated by a computing device, may include a video sequence310. The video sequence 310 may include a sequence of adjacent frames320. Although three adjacent frames 320 are shown, the video sequence310 can include any number of adjacent frames 320. Each frame 330 fromthe adjacent frames 320 may represent a single image from the videostream. A frame 330 may include blocks 340. Although not shown in FIG.3, a block can include pixels. For example, a block can include a 16×16group of pixels, an 8×8 group of pixels, an 8×16 group of pixels, or anyother group of pixels. Unless otherwise indicated herein, the term‘block’ can include a superblock, a macroblock, a segment, a slice, orany other portion of a frame. A frame, a block, a pixel, or acombination thereof can include display information, such as luminanceinformation, chrominance information, or any other information that canbe used to store, modify, communicate, or display the video stream or aportion thereof.

FIG. 4 is a block diagram of an encoder 400 in accordance withimplementations of this disclosure. Encoder 400 can be implemented in adevice, such as the computing device 100 shown in FIG. 1 or thecomputing and communication devices 100A/100B/100C shown in FIG. 2, as,for example, a computer software program stored in a data storage unit,such as the memory 150 shown in FIG. 1. The computer software programcan include machine instructions that may be executed by a processor,such as the processor 160 shown in FIG. 1, and may cause the device toencode video data as described herein. The encoder 400 can beimplemented as specialized hardware included, for example, in computingdevice 100.

The encoder 400 can encode an input video stream 402, such as the videostream 300 shown in FIG. 3 to generate an encoded (compressed) bitstream404. In some implementations, the encoder 400 may include a forward pathfor generating the compressed bitstream 404. The forward path mayinclude an intra/inter prediction unit 410, a transform unit 420, aquantization unit 430, an entropy encoding unit 440, or any combinationthereof. In some implementations, the encoder 400 may include areconstruction path (indicated by the broken connection lines) toreconstruct a frame for encoding of further blocks. The reconstructionpath may include a dequantization unit 450, an inverse transform unit460, a reconstruction unit 470, a loop filtering unit 480, or anycombination thereof. Other structural variations of the encoder 400 canbe used to encode the video stream 402.

For encoding the video stream 402, each frame within the video stream402 can be processed in units of blocks. Thus, a current block may beidentified from the blocks in a frame, and the current block may beencoded.

At the intra/inter prediction unit 410, the current block can be encodedusing either intra-frame prediction, which may be within a single frame,or inter-frame prediction, which may be from frame to frame.Intra-prediction may include generating a prediction block from samplesin the current frame that have been previously encoded andreconstructed. Inter-prediction may include generating a predictionblock from samples in one or more previously constructed referenceframes. Generating a prediction block for a current block in a currentframe may include performing motion estimation to generate a motionvector indicating an appropriate reference block in the reference frame.

The intra/inter prediction unit 410 may subtract the prediction blockfrom the current block (raw block) to produce a residual block. Thetransform unit 420 may perform a block-based transform, which mayinclude transforming the residual block into transform coefficients in,for example, the frequency domain. Examples of block-based transformsinclude the Karhunen-Loève Transform (KLT), the Discrete CosineTransform (DCT), and the Singular Value Decomposition Transform (SVD).In an example, the DCT may include transforming a block into thefrequency domain. The DCT may include using transform coefficient valuesbased on spatial frequency, with the lowest frequency (i.e. DC)coefficient at the top-left of the matrix and the highest frequencycoefficient at the bottom-right of the matrix.

The quantization unit 430 may convert the transform coefficients intodiscrete quantum values, which may be referred to as quantized transformcoefficients or quantization levels. The quantized transformcoefficients can be entropy encoded by the entropy encoding unit 440 toproduce entropy-encoded coefficients. Entropy encoding can include usinga probability distribution metric. The entropy-encoded coefficients andinformation used to decode the block, which may include the type ofprediction used, motion vectors, and quantizer values, can be output tothe compressed bitstream 404. The compressed bitstream 404 can beformatted using various techniques, such as run-length encoding (RLE)and zero-run coding.

The reconstruction path can be used to maintain reference framesynchronization between the encoder 400 and a corresponding decoder,such as the decoder 500 shown in FIG. 5. The reconstruction path may besimilar to the decoding process discussed below, and may includedequantizing the quantized transform coefficients at the dequantizationunit 450 and inverse transforming the dequantized transform coefficientsat the inverse transform unit 460 to produce a derivative residualblock. The reconstruction unit 470 may add the prediction blockgenerated by the intra/inter prediction unit 410 to the derivativeresidual block to create a reconstructed block. The loop filtering unit480 can be applied to the reconstructed block to reduce distortion, suchas blocking artifacts.

Other variations of the encoder 400 can be used to encode the compressedbitstream 404. For example, a non-transform based encoder 400 canquantize the residual block directly without the transform unit 420. Insome implementations, the quantization unit 430 and the dequantizationunit 450 may be combined into a single unit.

FIG. 5 is a block diagram of a decoder 500 in accordance withimplementations of this disclosure. The decoder 500 can be implementedin a device, such as the computing device 100 shown in FIG. 1 or thecomputing and communication devices 100A/100B/100C shown in FIG. 2, as,for example, a computer software program stored in a data storage unit,such as the memory 150 shown in FIG. 1. The computer software programcan include machine instructions that may be executed by a processor,such as the processor 160 shown in FIG. 1, and may cause the device todecode video data as described herein. The decoder 400 can beimplemented as specialized hardware included, for example, in computingdevice 100.

The decoder 500 may receive a compressed bitstream 502, such as thecompressed bitstream 404 shown in FIG. 4, and may decode the compressedbitstream 502 to generate an output video stream 504. The decoder 500may include an entropy decoding unit 510, a dequantization unit 520, aninverse transform unit 530, an intra/inter prediction unit 540, areconstruction unit 550, a loop filtering unit 560, a deblockingfiltering unit 570, or any combination thereof. Other structuralvariations of the decoder 500 can be used to decode the compressedbitstream 502.

The entropy decoding unit 510 may decode data elements within thecompressed bitstream 502 using, for example, Context Adaptive BinaryArithmetic Decoding, to produce a set of quantized transformcoefficients. The dequantization unit 520 can dequantize the quantizedtransform coefficients, and the inverse transform unit 530 can inversetransform the dequantized transform coefficients to produce a derivativeresidual block, which may correspond with the derivative residual blockgenerated by the inverse transformation unit 460 shown in FIG. 4. Usingheader information decoded from the compressed bitstream 502, theintra/inter prediction unit 540 may generate a prediction blockcorresponding to the prediction block created in the encoder 400. At thereconstruction unit 550, the prediction block can be added to thederivative residual block to create a reconstructed block. The loopfiltering unit 560 can be applied to the reconstructed block to reduceblocking artifacts. The deblocking filtering unit 570 can be applied tothe reconstructed block to reduce blocking distortion, and the resultmay be output as the output video stream 504.

Other variations of the decoder 500 can be used to decode the compressedbitstream 502. For example, the decoder 500 can produce the output videostream 504 without the deblocking filtering unit 570.

FIG. 6 is a block diagram of a representation of a portion 600 of aframe, such as the frame 330 shown in FIG. 3, in accordance withimplementations of this disclosure. As shown, the portion 600 of theframe includes four 64×64 blocks 610, in two rows and two columns in amatrix or Cartesian plane. In some implementations, a 64×64 block may bea maximum coding unit, N=64. Each 64×64 block may include four 32×32blocks 620. Each 32×32 block may include four 16×16 blocks 630. Each16×16 block may include four 8×8 blocks 640. Each 8×8 block 640 mayinclude four 4×4 blocks 650. Each 4×4 block 650 may include 16 pixels,which may be represented in four rows and four columns in eachrespective block in the Cartesian plane or matrix. The pixels mayinclude information representing an image captured in the frame, such asluminance information, color information, and location information. Insome implementations, a block, such as a 16×16 pixel block as shown, mayinclude a luminance block 660, which may include luminance pixels 662;and two chrominance blocks 670/680, such as a U or Cb chrominance block670, and a V or Cr chrominance block 680. The chrominance blocks 670/680may include chrominance pixels 690. For example, the luminance block 660may include 16×16 luminance pixels 662 and each chrominance block670/680 may include 8×8 chrominance pixels 690 as shown. Although onearrangement of blocks is shown, any arrangement may be used. AlthoughFIG. 6 shows N×N blocks, in some implementations, N×M blocks may beused. For example, 32×64 blocks, 64×32 blocks, 16×32 blocks, 32×16blocks, or any other size blocks may be used. In some implementations,N×2N blocks, 2N×N blocks, or a combination thereof may be used.

In some implementations, video coding may include ordered block-levelcoding. Ordered block-level coding may include coding blocks of a framein an order, such as raster-scan order, wherein blocks may be identifiedand processed starting with a block in the upper left corner of theframe, or portion of the frame, and proceeding along rows from left toright and from the top row to the bottom row, identifying each block inturn for processing. For example, the 64×64 block in the top row andleft column of a frame may be the first block coded and the 64×64 blockimmediately to the right of the first block may be the second blockcoded. The second row from the top may be the second row coded, suchthat the 64×64 block in the left column of the second row may be codedafter the 64×64 block in the rightmost column of the first row.

In some implementations, coding a block may include using quad-treecoding, which may include coding smaller block units within a block inraster-scan order. For example, the 64×64 block shown in the bottom leftcorner of the portion of the frame shown in FIG. 6, may be coded usingquad-tree coding wherein the top left 32×32 block may be coded, then thetop right 32×z32 block may be coded, then the bottom left 32×32 blockmay be coded, and then the bottom right 32×32 block may be coded. Each32×32 block may be coded using quad-tree coding wherein the top left16×16 block may be coded, then the top right 16×16 block may be coded,then the bottom left 16×16 block may be coded, and then the bottom right16×16 block may be coded. Each 16×16 block may be coded using quad-treecoding wherein the top left 8×8 block may be coded, then the top right8×8 block may be coded, then the bottom left 8×8 block may be coded, andthen the bottom right 8×8 block may be coded. Each 8×8 block may becoded using quad-tree coding wherein the top left 4×4 block may becoded, then the top right 4×4 block may be coded, then the bottom left4×4 block may be coded, and then the bottom right 4×4 block may becoded. In some implementations, 8×8 blocks may be omitted for a 16×16block, and the 16×16 block may be coded using quad-tree coding whereinthe top left 4×4 block may be coded, then the other 4×4 blocks in the16×16 block may be coded in raster-scan order.

In some implementations, video coding may include compressing theinformation included in an original, or input, frame by, for example,omitting some of the information in the original frame from acorresponding encoded frame. For example, coding may include reducingspectral redundancy, reducing spatial redundancy, reducing temporalredundancy, or a combination thereof.

In some implementations, reducing spectral redundancy may include usinga color model based on a luminance component (Y) and two chrominancecomponents (U and V or Cb and Cr), which may be referred to as the YUVor YCbCr color model, or color space. Using the YUV color model mayinclude using a relatively large amount of information to represent theluminance component of a portion of a frame, and using a relativelysmall amount of information to represent each corresponding chrominancecomponent for the portion of the frame. For example, a portion of aframe may be represented by a high resolution luminance component, whichmay include a 16×16 block of pixels, and by two lower resolutionchrominance components, each of which represents the portion of theframe as an 8×8 block of pixels. A pixel may indicate a value, forexample, a value in the range from 0 to 255, and may be stored ortransmitted using, for example, eight bits. Although this disclosure isdescribed in reference to the YUV color model, any color model may beused.

In some implementations, reducing spatial redundancy may includetransforming a block into the frequency domain using, for example, adiscrete cosine transform (DCT). For example, a unit of an encoder, suchas the transform unit 420 shown in FIG. 4, may perform a DCT usingtransform coefficient values based on spatial frequency.

In some implementations, reducing temporal redundancy may include usingsimilarities between frames to encode a frame using a relatively smallamount of data based on one or more reference frames, which may bepreviously encoded, decoded, and reconstructed frames of the videostream. For example, a block or pixel of a current frame may be similarto a spatially corresponding block or pixel of a reference frame. Insome implementations, a block or pixel of a current frame may be similarto block or pixel of a reference frame at a different spatial location,and reducing temporal redundancy may include generating motioninformation indicating the spatial difference, or translation, betweenthe location of the block or pixel in the current frame andcorresponding location of the block or pixel in the reference frame.

In some implementations, reducing temporal redundancy may includeidentifying a block or pixel in a reference frame, or a portion of thereference frame, that corresponds with a current block or pixel of acurrent frame. For example, a reference frame, or a portion of areference frame, which may be stored in memory, may be searched for thebest block or pixel to use for encoding a current block or pixel of thecurrent frame. For example, the search may identify the block of thereference frame for which the difference in pixel values between thereference block and the current block is minimized, and may be referredto as motion searching. In some implementations, the portion of thereference frame searched may be limited. For example, the portion of thereference frame searched, which may be referred to as the search area,may include a limited number of rows of the reference frame. In anexample, identifying the reference block may include calculating a costfunction, such as a sum of absolute differences (SAD), between thepixels of the blocks in the search area and the pixels of the currentblock.

In some implementations, the spatial difference between the location ofthe reference block in the reference frame and the current block in thecurrent frame may be represented as a motion vector. The difference inpixel values between the reference block and the current block may bereferred to as differential data, residual data, or as a residual block.In some implementations, generating motion vectors may be referred to asmotion estimation, a pixel of a current block may be indicated based onlocation using Cartesian coordinates as f_(x,y). Similarly, a pixel ofthe search area of the reference frame may be indicated based onlocation using Cartesian coordinates as r_(x,y). A motion vector (MV)for the current block may be determined based on, for example, a SADbetween the pixels of the current frame and the corresponding pixels ofthe reference frame.

Although described herein with reference to matrix or Cartesianrepresentation of a frame for clarity, a frame may be stored,transmitted, processed, or any combination thereof, in any datastructure such that pixel values may be efficiently represented for aframe or image. For example, a frame may be stored, transmitted,processed, or any combination thereof, in a two dimensional datastructure such as a matrix as shown, or in a one dimensional datastructure, such as a vector array. In an implementation, arepresentation of the frame, such as a two dimensional representation asshown, may correspond to a physical location in a rendering of the frameas an image. For example, a location in the top left corner of a blockin the top left corner of the frame may correspond with a physicallocation in the top left corner of a rendering of the frame as an image.

In some implementations, block based coding efficiency may be improvedby partitioning blocks into one or more partitions, which may berectangular, including square, partitions. In some implementations,video coding using partitioning may include selecting a partitioningscheme from among multiple candidate partitioning schemes. For example,in some implementations, candidate partitioning schemes for a 64×64coding unit may include rectangular size partitions ranging in sizesfrom 4×4 to 64×64, such as 4×4, 4×8, 8×4, 8×8, 8×16, 16×8, 16×16, 16×32,32×16, 32×z32, 32×64, 64×32, or 64×64. In some implementations, videocoding using partitioning may include a full partition search, which mayinclude selecting a partitioning scheme by encoding the coding unitusing each available candidate partitioning scheme and selecting thebest scheme, such as the scheme that produces the least rate-distortionerror.

In some implementations, encoding a video frame may include identifyinga partitioning scheme for encoding a current block, such as block 610.In some implementations, identifying a partitioning scheme may includedetermining whether to encode the block as a single partition of maximumcoding unit size, which may be 64×64 as shown, or to partition the blockinto multiple partitions, which may correspond with the sub-blocks, suchas the 32×32 blocks 620 the 16×16 blocks 630, or the 8×8 blocks 640, asshown, and may include determining whether to partition into one or moresmaller partitions. For example, a 64×64 block may be partitioned intofour 32×32 partitions. Three of the four 32×32 partitions may be encodedas 32×32 partitions and the fourth 32×32 partition may be furtherpartitioned into four 16×16 partitions. Three of the four 16×16partitions may be encoded as 16×16 partitions and the fourth 16×16partition may be further partitioned into four 8×8 partitions, each ofwhich may be encoded as an 8×8 partition. In some implementations,identifying the partitioning scheme may include using a partitioningdecision tree.

In some implementations, video coding for a current block may includeidentifying an optimal coding mode from multiple candidate coding modes,which may provide flexibility in handling video signals with variousstatistical properties, and may improve the compression efficiency. Forexample, a video coder may evaluate each candidate coding mode toidentify the optimal coding mode, which may be, for example, the codingmode that minimizes an error metric, such as a rate-distortion cost, forthe current block. In some implementations, the complexity of searchingthe candidate coding modes may be reduced by limiting the set ofavailable candidate coding modes based on similarities between thecurrent block and a corresponding prediction block. In someimplementations, the complexity of searching each candidate coding modemay be reduced by performing a directed refinement mode search. Forexample, metrics may be generated for a limited set of candidate blocksizes, such as 16×16, 8×8, and 4×4, the error metric associated witheach block size may be in descending order, and additional candidateblock sizes, such as 4×8 and 8×4 block sizes, may be evaluated.

FIG. 7 is a block diagram of a low-latency two-pass video coding unit700 in accordance with implementations of this disclosure. Thelow-latency two-pass video coding unit 700 can be implemented in adevice, such as the computing device 100 shown in FIG. 1 or thecomputing and communication devices 100A/100B/100C shown in FIG. 2. Forexample, the encoder 400 shown in FIG. 4 may include the low-latencytwo-pass video coding unit 700 shown in FIG. 7.

In some implementations, the low-latency two-pass video coding unit 700may include a frame buffer 710, first-pass resizing unit 720, a codingunit 730, an analysis unit 740, or a combination thereof, and mayperform low-latency two-pass video coding using a single coding unit730. For example, the low-latency two-pass video coding unit 700 maylow-latency two-pass encode video in real-time.

The frame buffer 710 may receive and store one or more frames from aninput video sequence, such as the input video sequence 402 shown in FIG.4. In some implementations, the number, or cardinality, of input framesreceived and stored at the frame buffer 710 may be determined based on adefined buffer value. In some implementations, the defined buffer valuemay be based on a latency threshold.

The first-pass resizing unit 720 may receive an input frame from theframe buffer 710 and may generate a reduced frame based on the inputframe. In some implementations, the resizing unit 720 may include acropping unit 722. The cropping unit 722 may generate the reduced frameby cropping the input frame. For example, the input frame may be a N×Mframe, and the cropping unit 722 may identify a

$\frac{N}{2} \times \frac{M}{2}$portion of the input frame, such as a portion at the center of the inputframe, as the reduced frame. A cropped reduced frame may include a fullresolution portion of the input frame spatially smaller than the inputframe.

In some implementations, the resizing unit 720 may include a scalingunit 724. The scaling unit 724 may generate the reduced frame byscaling, or sub-sampling, the input frame. A scaled reduced frame mayinclude a lower resolution representation of the input frame, which maybe spatially concurrent with the input frame. In some implementations,subsampling, or scaling, may include receiving the full input frame. Forexample, the input frame may be a 2160 p frame, and the sub-sampling maygenerate a 1080p reduced frame, which may include using 270 megabytes((3840×2160×1.5−1920×1080×1.5)*30) of memory bandwidth per frame.

In some implementations, the resizing unit 720 may include the croppingunit 722 and the scaling unit 724. In some implementations, low-latencytwo-pass video coding may include determining whether to generate thereduced frame using the cropping unit 722, the scaling unit 724, orboth. For example, low-latency two-pass video coding may includegenerating the reduced frame by cropping the input frame to identify a

$\frac{3\; N}{4} \times \frac{3\; M}{4}$cropped portion of the input frame and using the scaling unit 724 tosub-sample the a

$\frac{3\; N}{4} \times \frac{3\; M}{4}$cropped portion, to generate a reduced frame that is smaller than theinput frame spatially and has a lower resolution.

Although shown separately, in some implementations, the cropping unit722 and the scaling unit 724 may be implemented as a combined croppingand scaling unit. In some implementations, the resizing unit 720 mayinclude the cropping unit 722 and omit the scaling unit 724 or theresizing unit 720 may omit the cropping unit 722 and include the scalingunit 724.

In some implementations, the coder 730 may first-pass encode the reducedframe generated by the resizing unit 720. Encoding the reduced framegenerated by the resizing unit 720 may include identifying encodingmetrics, such as one or more coding statistics, based on encoding thereduced frame generated by the resizing unit 720. For example,identifying the encoding metrics may include identifying a global motionvector for encoding the reduced frame generated by the resizing unit720, identifying a cardinality of a plurality of intra-coded blocks forencoding the reduced frame generated by the resizing unit 720,identifying a motion vector field uniformity metric for encoding thereduced frame generated by the resizing unit 720, identifying acardinality of a plurality of skipped blocks for encoding the reducedframe generated by the resizing unit 720, identifying a cardinality of aplurality of zero-motion blocks for encoding reduced frame generated bythe resizing unit 720, identifying a distribution of reference framesfor encoding the reduced frame generated by the resizing unit 720, orany other coding metric, or combination of coding metrics identifiablebased on encoding the reduced frame generated by the resizing unit 720.For example, the motion vector field uniformity metric may indicatewhether inter-frame motion corresponds with uniform motion, such aspanning motion. In some implementations, identifying the coding metricsbased on encoding the reduced frame generated by the resizing unit 720may include identifying one or more motion vectors corresponding to oneor more blocks of the reduced frame generated by the resizing unit 720.

In some implementations, the analysis unit 740 may evaluate thefirst-pass coding metrics identified by the coder 730 first-passencoding the reduced frame. In some implementations, evaluating thefirst-pass coding metrics may include determining one or more encodingparameters for second-pass encoding the input frame by the coding unit730.

The coding unit 730 may receive the input frame from the frame buffer710, may receive the second-pass coding parameters from the analysisunit 740, and may second-pass encode the input frame using thesecond-pass coding parameters. Encoding the input frame in a second-passusing coding parameters determined based on encoding the reduced framein a first-pass may improve coding quality for encoding the input frame.

In some implementations, the first-pass encoding may include generatinga motion vector field, generating the first-pass coding metrics mayinclude identifying motion vector length statistics corresponding to themotion vector field, and the analysis unit 740, the coder 730, or acombination thereof, may adjust the motion vector length statisticsbased on the size of the reduced size frame relative to the input frame.In some implementations, the motion vector length statistics may bescaled inversely proportional to the reduction in size performed by theresizing unit 720. For example, the resizing unit may generate thereduced size frame at 50% of the size of the input frame, and a motionvector length of 4 may be up-scaled to 8.

In some implementations, video coding, such as first-pass encoding,second-pass encoding, or both, may include motion estimation, which mayinclude motion searching. Motion searching may include identifying acurrent block of a current frame for encoding, searching a portion of areference frame for a reference block that most closely matches thecurrent block, and identifying a motion vector for the current blockbased on a spatial difference between the location of the current blockin the current frame and the location of the reference block in thereference frame. The portion of the reference frame searched may includea candidate reference block from the reference frame having a locationspatially corresponding to the current block in the input frame, and mayinclude blocks neighboring the candidate reference block in thereference frame. In some implementations, motion between the referenceframe and the current frame may exceed the size of the search area, andthe motion estimation may not efficiently identify an accurate referenceblock for the current block.

In some implementations, low-latency two-pass video coding may improvecoding efficiency for frames representing motion that exceeds the motionsearch area size. In some implementations, second-pass encoding theinput frame may include identifying a current block of the input frame,identifying a corresponding motion vector from the first-pass encodingmetrics, which may be a motion vector identified for a block from thereduced frame having a spatial location in the reduced framecorresponding to a spatial location of the current block in the inputframe, and using the motion vector to perform motion searching byidentifying a candidate reference block in a reference frame indicatedby the motion vector, and searching the candidate reference block andneighboring blocks for a best matching block.

In some implementations, the coding unit 730 may output the second-passencoded block as the encoded block for the input frame. For example, thecoding unit 730 may include the second-pass encoded block in an outputbitstream.

FIG. 8 is a flow diagram of a method of low-latency two-pass videocoding in accordance with implementations of this disclosure.Low-latency two-pass video coding may be implemented in a low-latencytwo-pass video coding unit, such as the low-latency two-pass videocoding unit 700 shown in FIG. 7. In some implementations, low-latencytwo-pass video coding may include identifying an input frame at 800,determining a reduced frame at 810, first-pass encoding the reducedframe at 820, second-pass encoding the input frame at 830, output anencoded frame at 840, or a combination thereof.

In some implementations, an input frame may be identified at 800.Identifying an input frame may include receiving one or more inputframes at a frame buffer, such as the frame buffer 710 shown in FIG. 7,and buffering the input frames.

In some implementations, a reduced frame may be generated at 810. Insome implementations, generating a reduced frame at 810 may includereceiving the input frame at resizing unit, such as the resizing unit720 shown in FIG. 7, from a frame buffer, such as the frame buffer 710shown in FIG. 7. In some implementations, generating a reduced frame at810 may include cropping the input frame, scaling the input frame, orcropping and scaling the input frame.

In some implementations, the reduced frame may be first-pass encoded at820. In some implementations, a coding unit, such as the coding unit 730shown in FIG. 7, may first-pass encode the reduced frame at 820. In someimplementations, first-pass encoding the reduced frame at 820 mayinclude generating first-pass coding metrics based on first-passencoding the reduced frame. Although not shown separately in FIG. 8, insome implementations, the first-pass coding metrics may be analyzed,such as by an analysis unit, such as the analysis unit 740 shown in FIG.7, to identify second-pass coding parameters for second-pass encodingthe input frame at 830.

In some implementations, the input frame may be second-pass encoded at830. In some implementations, the coding unit may receive the inputframe from the frame buffer and may receive second-pass codingparameters, such as from the analysis unit, based on first-pass encodingthe reduced frame at 820, and may second-pass encode the input frameusing the second-pass coding parameters. In some implementations,second0-pass encoding may include generating an encoded frame, and theencoded frame may be output at 840.

FIG. 9 is a diagram of an example of buffering for low-latency two-passvideo coding in accordance with implementations of this disclosure. Insome implementations, low-latency two-pass video coding may includebuffering a defined number, or cardinality, of input frames. Forexample, a frame buffer, such as the frame buffer 710 shown in FIG. 7,may buffer input frames.

In some implementations, buffering frames may include first-passencoding a defined number N, or cardinality, of frames prior tosecond-pass encoding a first frame. In an example, as shown, thelow-latency two-pass video coding unit may first-pass encode frames 1 toN. Subsequent to first-pass encoding frame N the low-latency two-passvideo coding unit may second-pass encode frame 1. Subsequently, thelow-latency two-pass video coding unit may first-pass encode frame N+1.Subsequently the low-latency two-pass video coding unit may second-passencode frame 2. Subsequently the low-latency two-pass video coding unitmay first-pass encode frame N+2.

FIG. 10 is a diagram of examples of generating a reduced frame forlow-latency two-pass video coding in accordance with implementations ofthis disclosure. In some implementations, low-latency two-pass videocoding may include generating a reduced frame, such as shown at 810 inFIG. 8. For example, a frame resizing unit, such as the resizing unit720 shown in FIG. 7, may generating a reduced frame from an input frame.

In some implementations, generating a reduced frame may include croppingthe input frame. Cropping the input frame may include identifying aportion of the input frame, spatially smaller than the input frame asindicated by the thick black boarder shown at 1010, and using theinformation from the input frame in the identified portion as thecropped frame 1012. Although the size of the cropped frame 1012 is shownin FIG. 10 as being half the size of the input frame, any size croppedframe, smaller than the input frame, may be used. Although the croppedportion is shown at the center of the input frame at 1010, the croppedportion may be identified anywhere within the frame.

In some implementations, generating a reduced frame may include scaling,or sub-sampling, the input frame. In some implementations, scaling theinput frame may include identifying a resolution of the input frame asshown at 1020, identifying a reduced resolution, less than the inputresolution, and generating a reduced frame 1022 having the reducedresolution based on the input frame. The reduced frame 1022 is shown inFIG. 10 as being spatially smaller than the input frame 1020 to indicatethat that the reduced frame 1022 includes less information; however, thereduced frame 1022 may be spatially concurrent with the input frame1020.

In some implementations, generating a reduced frame may include croppingand scaling the input frame. For example, a portion of the input frame,spatially smaller than the input frame, may be identified, as indicatedby the thick black boarder shown at 1030, and the information from theinput frame in the identified portion may be scaled to generate thecropped frame 1032.

The words “example” or “exemplary” are used herein to mean serving as anexample, instance, or illustration. Any aspect or design describedherein as “example” or “exemplary” not necessarily to be construed aspreferred or advantageous over other aspects or designs. Rather, use ofthe words “example” or “exemplary” is intended to present concepts in aconcrete fashion. As used in this application, the term “or” is intendedto mean an inclusive “or” rather than an exclusive “or”. That is, unlessspecified otherwise, or clear from context, “X includes A or B” isintended to mean any of the natural inclusive permutations. That is, ifX includes A; X includes B; or X includes both A and B, then “X includesA or B” is satisfied under any of the foregoing instances. In addition,the articles “a” and “an” as used in this application and the appendedclaims should generally be construed to mean “one or more” unlessspecified otherwise or clear from context to be directed to a singularform. Moreover, use of the term “an embodiment” or “one embodiment” or“an implementation” or “one implementation” throughout is not intendedto mean the same embodiment or implementation unless described as such.As used herein, the terms “determine” and “identify”, or any variationsthereof, includes selecting, ascertaining, computing, looking up,receiving, determining, establishing, obtaining, or otherwiseidentifying or determining in any manner whatsoever using one or more ofthe devices shown in FIG. 1.

Further, for simplicity of explanation, although the figures anddescriptions herein may include sequences or series of steps or stages,elements of the methods disclosed herein can occur in various ordersand/or concurrently. Additionally, elements of the methods disclosedherein may occur with other elements not explicitly presented anddescribed herein. Furthermore, not all elements of the methods describedherein may be required to implement a method in accordance with thedisclosed subject matter.

The implementations of the transmitting station 100A and/or thereceiving station 100B (and the algorithms, methods, instructions, etc.stored thereon and/or executed thereby) can be realized in hardware,software, or any combination thereof. The hardware can include, forexample, computers, intellectual property (IP) cores,application-specific integrated circuits (ASICs), programmable logicarrays, optical processors, programmable logic controllers, microcode,microcontrollers, servers, microprocessors, digital signal processors orany other suitable circuit. In the claims, the term “processor” shouldbe understood as encompassing any of the foregoing hardware, eithersingly or in combination. The terms “signal” and “data” are usedinterchangeably. Further, portions of the transmitting station 100A andthe receiving station 100B do not necessarily have to be implemented inthe same manner.

Further, in one implementation, for example, the transmitting station100A or the receiving station 100B can be implemented using a computerprogram that, when executed, carries out any of the respective methods,algorithms and/or instructions described herein. In addition oralternatively, for example, a special purpose computer/processor can beutilized which can contain specialized hardware for carrying out any ofthe methods, algorithms, or instructions described herein.

The transmitting station 100A and receiving station 100B can, forexample, be implemented on computers in a real-time video system.Alternatively, the transmitting station 100A can be implemented on aserver and the receiving station 100B can be implemented on a deviceseparate from the server, such as a hand-held communications device. Inthis instance, the transmitting station 100A can encode content using anencoder 400 into an encoded video signal and transmit the encoded videosignal to the communications device. In turn, the communications devicecan then decode the encoded video signal using a decoder 500.Alternatively, the communications device can decode content storedlocally on the communications device, for example, content that was nottransmitted by the transmitting station 100A. Other suitabletransmitting station 100A and receiving station 100B implementationschemes are available. For example, the receiving station 100B can be agenerally stationary personal computer rather than a portablecommunications device and/or a device including an encoder 400 may alsoinclude a decoder 500.

Further, all or a portion of implementations can take the form of acomputer program product accessible from, for example, a tangiblecomputer-usable or computer-readable medium. A computer-usable orcomputer-readable medium can be any device that can, for example,tangibly contain, store, communicate, or transport the program for useby or in connection with any processor. The medium can be, for example,an electronic, magnetic, optical, electromagnetic, or a semiconductordevice. Other suitable mediums are also available.

The above-described implementations have been described in order toallow easy understanding of the application are not limiting. On thecontrary, the application covers various modifications and equivalentarrangements included within the scope of the appended claims, whichscope is to be accorded the broadest interpretation so as to encompassall such modifications and equivalent structure as is permitted underthe law.

What is claimed is:
 1. A method comprising: identifying an input framefrom an input video stream; determining a reduced frame from the inputframe, the reduced frame having a size smaller than a size of the inputframe; encoding the reduced frame using a first encoder, whereinencoding the reduced frame includes generating a plurality of encodingmetrics; generating a plurality of encoding parameters based on theplurality of encoding metrics; generating an encoded frame by encodingthe input frame using the first encoder and at least one encodingparameter from the plurality of encoding parameters; including the firstencoded frame in an output bitstream; and storing or transmitting theoutput bitstream.
 2. The method of claim 1, wherein determining thereduced frame from the input frame includes cropping the input frame. 3.The method of claim 1, wherein determining the reduced frame from theinput frame includes scaling the input frame.
 4. The method of claim 1,wherein determining the reduced frame from the input frame includescropping and scaling the input frame.
 5. The method of claim 1, whereinthe plurality of encoding metrics includes one or more of a globalmotion vector for encoding the reduced frame, a cardinality of aplurality of intra-coded blocks for encoding the reduced frame, acardinality of a plurality of skipped blocks for encoding the reducedframe, a cardinality of a plurality of zero-motion blocks for encodingthe reduced frame, or a distribution of reference frames for encodingthe reduced frame.
 6. The method of claim 1, wherein encoding thereduced frame includes: identifying a first block from the reducedframe; and identifying a motion vector for encoding the first block. 7.The method of claim 6, wherein encoding the input frame includes:identifying a second block from the input frame, the second blockspatially corresponding to the first block; and on a condition that themotion vector exceeds a motion threshold, using a motion search area formotion estimation for the second block identified based on the motionvector.
 8. The method of claim 1, wherein identifying the input framefrom the input video stream includes buffering a plurality of inputframes from the input video stream, the plurality of input framesincluding the input frame.
 9. A method comprising: identifying an inputframe from an input video stream, wherein the input frame includes aninput block; determining a reduced frame from the input frame, thereduced frame having a size smaller than a size of the input frame,wherein the reduced frame includes a reduced block spatiallycorresponding to at least a portion of the input block; encoding, by afirst encoder, the reduced frame, wherein encoding the reduced frameincludes generating a plurality of encoding metrics, wherein generatingthe plurality of encoding metrics includes identifying a motion vectorfor encoding the reduced block; generating a plurality of encodingparameters based on the plurality of encoding metrics; generating, bythe first encoder, an encoded frame by encoding the input frame based onat least one encoding parameter from the plurality of encodingparameters, wherein encoding the input frame includes, on a conditionthat the motion vector exceeds a motion threshold, using a motion searcharea for motion estimation for the input block, wherein the motionsearch area is identified based on the motion vector; including theencoded frame in an output bitstream; and storing or transmitting theoutput bitstream.
 10. The method of claim 9, wherein determining thereduced frame from the input frame includes cropping the input frame.11. The method of claim 9, wherein determining the reduced frame fromthe input frame includes scaling the input frame.
 12. The method ofclaim 9, wherein determining the reduced frame from the input frameincludes cropping and scaling the input frame.
 13. The method of claim9, wherein the plurality of encoding metrics includes one or more of aglobal motion vector for encoding the reduced frame, a cardinality of aplurality of intra-coded blocks for encoding the reduced frame, acardinality of a plurality of skipped blocks for encoding the reducedframe, a cardinality of a plurality of zero-motion blocks for encoding.14. The method of claim 9, wherein identifying the input frame from theinput video stream includes buffering a plurality of input frames fromthe input video stream, the plurality of input frames including theinput frame.
 15. A method comprising: identifying an input frame from aninput video stream; determining a reduced frame from the input frame,the reduced frame having a size smaller than a size of the input frame,wherein determining the reduced frame from the input frame includescropping the input frame, scaling the input frame, or cropping andscaling the input frame; encoding, using a first encoder, the reducedframe, wherein encoding the reduced frame includes generating aplurality of encoding metrics; generating at least one encodingparameter based on the plurality of encoding metrics; generating, usingthe first encoder, an encoded frame by encoding the input frame usingthe at least one encoding parameter; including the first encoded framein an output bitstream; and storing or transmitting the outputbitstream.
 16. The method of claim 15, wherein the at least one encodingparameter includes one or more of a global motion vector for encodingthe reduced frame, a cardinality of a plurality of intra-coded blocksfor encoding the reduced frame, a motion vector field uniformity metric,a cardinality of a plurality of skipped blocks for encoding the reducedframe, a cardinality of a plurality of zero-motion blocks for encodingthe reduced frame, or a distribution of reference frames for encodingthe reduced frame.
 17. The method of claim 15, wherein encoding thereduced frame includes: identifying a first block from the reducedframe; and identifying a motion vector for encoding the first block; andwherein encoding the input frame includes: identifying a second blockfrom the input frame, the second block spatially corresponding to thefirst block, and on a condition that the motion vector exceeds a motionthreshold, using a motion search area for motion estimation for thesecond block identified based on the motion vector.